package com.ruoyi.exam.service;

import com.ruoyi.exam.domain.PExam;
import com.ruoyi.exam.domain.PQuestion;
import com.ruoyi.exam.vo.AddExamByBankVo;
import com.ruoyi.exam.vo.AddExamByQuestionVo;
import com.ruoyi.exam.vo.ExamByLogResult;
import org.springframework.web.bind.annotation.RequestBody;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 考试Service接口
 *
 * @author ruoyi
 * @date 2022-01-05
 */
public interface IPExamService
{
    /**
     * 查询考试
     *
     * @param id 考试主键
     * @return 考试
     */
    public PExam selectPExamById(Long id);

    /**
     * 查询考试列表
     *
     * @param pExam 考试
     * @return 考试集合
     */
    public List<PExam> selectPExamList(PExam pExam);

    /**
     * 新增考试
     *
     * @param pExam 考试
     * @return 结果
     */
    public int insertPExam(PExam pExam);

    /**
     * 修改考试
     *
     * @param pExam 考试
     * @return 结果
     */
    public int updatePExam(PExam pExam);

    /**
     * 批量删除考试
     *
     * @param ids 需要删除的考试主键集合
     * @return 结果
     */
    public int deletePExamByIds(Long[] ids);

    /**
     * 删除考试信息
     *
     * @param id 考试主键
     * @return 结果
     */
    public int deletePExamById(Long id);


    public int addExamByBank(AddExamByBankVo addExamByBankVo,String userName);

    public int addExamByQuestion(AddExamByQuestionVo addExamByQuestionVo,String userName);

    public AddExamByQuestionVo getExamById(Integer examId);

    public int updateExamInfo(AddExamByQuestionVo addExamByQuestionVo) throws ParseException;

    public ArrayList<HashMap<String, Object>> examInfo(Long examId);

    public List<PExam> selectPExamByUserList(PExam pExam);

  ExamByLogResult examLogInfo(ExamByLogResult pExamRecordLog1);

    String[] getQuAScString(List<PQuestion> byIds, String scores);
}
